package com.atguigu.springcloud.service;

import com.atguigu.springcloud.bean.User;
import com.atguigu.springcloud.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class UserService {
    @Autowired
    UserMapper userMapper;
    public User getUser(Integer id) {
        return userMapper.getUser(id);
    }

    public Map getUserAndMovie(Integer id) {
        User user = getUser(id);
        Map map = new HashMap();
        map.put("user",  user);
        map.put("movie",null);
        return map;
    }
}
